php forum
php mysql forum
php mysql smarty
 
Page 1 of 2 1 2 >
Topic Options
#244613 - 04/28/03 03:40 AM Beta-[6.2-6.3] Banner Ad Rotator 1.0
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Mod Name / Version: Banner Ad Rotator 1.0 <br /> <br />Description: This is a simple rotation tool, which pulls banners (or content) from a private forum and feeds it randomly into a box at the top of your site, just above your menu bar. There is an option to stick a particular banner, rather than using the random rotation, in the event of something you wish to promote, like a special or a sale. <br /> <br />Working Under: UBB.Threads 6.2-6.3 <br /> <br />Mod Status: Beta <br /> <br />Any pre-requisites: none <br /> <br />Author(s): JoshPet <br /> <br />Date: 2/24/03 <br /> <br />Credits: Commissioned by www.drugbuyers.com <br /> <br />Files Altered: ubbt.inc.php <br /> <br />New Files: bannerad.php <br /> <br />Database Altered: none <br /> <br />Info/Instructions: This allows you to store, add, edit or delete your banners just by adding or removing them from a "hidden" forum. Simple Interface. Verified instructions work fine for 6.3. <br /> <br />


Attachments
77955-BannerAdRotator1.0.zip (300 downloads)



Edited by JoshPet (04/28/03 03:42 AM)
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#244614 - 07/15/03 06:45 PM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: Daine]
LS1TECH Offline
Lurker

Registered: 04/28/03
Posts: 1
Loc: Houston, TX
Josh, I did the changes to my site to show some large banners at the top, but they are not showing up. Could you look at my page? www.LS1TECH.com<br /><br />Thanks

Top
#244615 - 07/16/03 03:04 AM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: gnewtzie]
Ian_W Offline

Veteran

Registered: 02/22/02
Posts: 2575
Loc: England
You have no code header section for the banners - although I have not looked at this hack - my suggestion is to check the bits relevant to adding the banners to the tmpl files.
_________________________
Fans Focus - Focusing on Fans of Sport

(Okay - mainly football (the British variety wink at the moment - but expanding all the time....)

Top
#244616 - 09/04/03 01:19 AM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: Daine]
filamballa Offline
Newbie

Registered: 08/28/03
Posts: 24
Hey Josh Installed this mod but when I paste HTML it doesn't translate. I see the code appear on top. I verified that HTML is turned on.. amy I missing something?

Top
#244617 - 09/04/03 05:07 PM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: goddess]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
If you enable HTML and can see what you posted in the forum.... then it should work.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#244618 - 09/04/03 05:37 PM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: Daine]
msula Offline
Addict

Registered: 02/18/02
Posts: 1969
Loc: Lansing, Michigan
Could this be easily adapated to say put the banner in ubbt_footer.tmpl rather than just at the top of every page?

Top
#244619 - 09/04/03 05:39 PM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: palmen]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Yeah, at measurection I actually use it at the top and bottom. You'll see how you simply "include" the file right below the menu bar.... you can do the same before the ubbt_footer.tmpl. <img src="/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#244620 - 09/04/03 07:02 PM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: Daine]
msula Offline
Addict

Registered: 02/18/02
Posts: 1969
Loc: Lansing, Michigan
Great.. I just had a few local businesses who asked about putting a small banner on the site.. and about 10 minutes later I see this hack <img src="/forum/images/graemlins/grin.gif" alt="" /> Perfect timing

Top
#244621 - 09/04/03 07:08 PM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: palmen]
filamballa Offline
Newbie

Registered: 08/28/03
Posts: 24
I enabled HTML in the Forum but when I paste HTML on the post window the CODE doesn't translate.<br /><br />

Top
#244622 - 09/04/03 07:39 PM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: goddess]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Do you have a link so I can see what code you're trying to use? <br /> <br />Although if you are having trouble posting HTML in your forums.... you'll have to work out that issue first.
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#244623 - 09/04/03 08:43 PM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: Daine]
filamballa Offline
Newbie

Registered: 08/28/03
Posts: 24
The Banners forum has HTML enabled. I pasted the code below and it shows up just like this. <br /> <br /> <br /> <iframe marginwidth="0" marginheight="0" width="120" height="240" scrolling="no" frameborder="0" src="http://rcm.amazon.com/e/cm?o=1&l=as1&f=ifr&t=filambasketba-20&p=8&asins=B000067J2V&IS2=1<1=_blank"><MAP NAME="boxmap-p8"><AREA SHAPE="RECT" COORDS="14, 200, 103, 207" HREF="http://rcm.amazon.com/e/cm/privacy-policy.html?o=1" ><AREA COORDS="0,0,10000,10000" HREF="http://www.amazon.com/exec/obidos/redirect-home/filambasketba-20" ></MAP><img src="http://rcm-images.amazon.com/images/G/01/rcm/120x240.gif" width="120" height="240" border="0" usemap="#boxmap-p8" alt="Shop at Amazon.com"></iframe> <br /> <br />You should still have access to the site. <br /> <br />http://www.filambasketball.com <br /> <br />/EDITED <br /> <br />Thanks for everyone's help. I figured it out. <br />


Edited by filamballa (09/05/03 12:21 AM)

Top
#244624 - 10/28/03 09:07 AM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: Daine]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
HELP!<br />What does this mean?<br /><br />Parse error: parse error in /home/fordmond/public_html/ubbthreads/bannerad.php on line 92<br /> <br />

Top
#244625 - 10/28/03 09:32 AM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: Luka_dup1]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
Check for an error like a missing } " ; <br /> <br />I have not downloaded this one but if there was something you had to edit when installing the hack in that file I would look at the lines you edited because sometimes the error can be thrown down the page like when parentheses is missed. Now a missing ; or " should be on the line stated. <br /> <br />This is in the instructions <br /> <br /> <br />If you wish to use a board keyword other than "banners" you can edit the $boardkeyword <br />variable at the top of the included bannerad.php file. <br /> <br /> <br />#### <br />#### Add a config variable <br />#### <br /> <br />In your admin menu, edit the config file. <br />Scroll to the very bottom, into the box of extra/unknown variables, add this: <br />$config['banner'] = ''; <br /> <br /> <br />Did you edit the banner keyword to something else? Did you add the variable above to the admin control panel? <br /> <br />If you edited the variable in the bannerad.php file make sure you have it like this "newname";
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#244626 - 10/28/03 11:53 AM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: sf49rminer]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
Oh Poo!<br />I've re-hacked the ubbt.inc file from afresh, and it hasnt made any difference. I still get the same error. <img src="http://www.ubbdev.com/forum/images/graemlins/frown.gif" alt="" /><br />Help me Oh Knowledgeable ones! lol!

Top
#244627 - 10/28/03 12:00 PM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: sf49rminer]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
[]Omegatron said:<br /><br /><br />Did you edit the banner keyword to something else? Did you add the variable above to the admin control panel?<br /><br />If you edited the variable in the bannerad.php file make sure you have it like this "newname"; [/]<br /><br /><br />nope and yep m8

Top
#244628 - 10/28/03 02:11 PM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: Luka_dup1]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
Line 30 of file bannerad.php should read<br /><br /> $boardkeyword = "banners";<br /><br />I just downloaded the hack and it reads<br /><br /> $boardkeyword = "banner";<br /><br /><br />So I suspect this is your error.
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#244629 - 10/28/03 03:11 PM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: sf49rminer]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
you've lost me completley now m8, sorry. Line 30 i get this<br /><br /><br />"// and the HTML for the banner in the body of the post"<br /><br /><br />also, in my bannerad.php i dont have a link which reads $boardkeyword = "banner";. I did a search abd it didnt come up with anything as a doublecheck.

Top
#244630 - 10/28/03 04:21 PM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: Luka_dup1]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
By default the program has a keyword of banners. The one in the install file has banner. I opened the zip and checked. If your line 30 is not what I stated I highly suggest downloading another copy from here.<br /><br />Make sure you have the banner keyword set with the variable that needs to be set in the config.inc.php file and the one set in the bannerad.php file.
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#244631 - 10/28/03 05:32 PM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: Daine]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
[]JoshPet said:<br /><br />Info/Instructions: This allows you to store, add, edit or delete your banners just by adding or removing them from a "hidden" forum. Simple Interface. Verified instructions work fine for 6.3.<br /><br /> [/]<br /><br />Is anyone here running this on 6.2?<br />I still cant get it to work omegatron <img src="http://www.ubbdev.com/forum/images/graemlins/frown.gif" alt="" />

Top
#244632 - 10/28/03 05:43 PM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: Luka_dup1]
omegatron Offline
Member

Registered: 04/05/01
Posts: 3440
Loc: abingdon,md
Simpliest thing to do is uninstall the hack and start over reading all directions. This is installed on several sites.<br /><br />You already stated your board keyword is empty so I would start there. Follow the directions to the letter.
_________________________
Chuck S

DIVE IN AND VISIT ME:

Omegatron\'s Reefs

Administrator at ReefTalk

Top
#244633 - 11/01/03 11:20 PM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: sf49rminer]
TheInsider Offline
Journeyman

Registered: 03/16/03
Posts: 124
Loc: Baghdad, Iraq
I am getting that parse error on line 92 like the guy above... I dont see where anything is missing. <br /> <br />error: Parse error: parse error in /home/tampains/public_html/ubbthreads/bannerad.php on line 92 <br /> <br /> <br />Here is what I have: <br /> <br />80 // If we found the banner, we'll send the output <br />81 // otherwise there just won't be a box. <br />82 if ($Banner) { <br />83 echo <<<BANNER <br />84 $tbopen <br />85 <tr> <br />86 <td align="center" class="darktable"> <br />87 <b>Support Our Site - $Title</b> <br />88 </td> <br />89 </tr> <br />90 <td align="center" class="lighttable"> <br />91 $Banner <br />92 </td> <br />93 </tr> <br />94 $tbclose <br />95 <br /> <br />96 BANNER; <br />97 } <br /> <br /> <br />My board keyword and config variable are set correctly. <br /> <br />Any idea? <br /> <br />Update: Actually no matter what changes I make or whatever I still get the same error. I dont know what's up.


Edited by TampaInsider (11/01/03 11:48 PM)

Top
#244634 - 11/02/03 12:09 AM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: scot]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Some servers seem to not like HTML inside the echo statements like that. Try this:<br /><br />80 // If we found the banner, we'll send the output<br />81 // otherwise there just won't be a box.<br />82 if ($Banner) {<br />83 echo "<br />84 $tbopen<br />85 <tr><br />86 <td align=\"center\" class=\"darktable\"><br />87 <b>Support Our Site - $Title</b><br />88 </td><br />89 </tr><br />90 <td align=\"center\" class=\"lighttable\"><br />91 $Banner<br />92 </td><br />93 </tr><br />94 $tbclose<br />95 <br /><br />96 ";<br />97 }<br /><br /><br />Note the change in the echo statements and that a \ was added before each quote mark. <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#244635 - 11/02/03 12:20 AM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: Daine]
TheInsider Offline
Journeyman

Registered: 03/16/03
Posts: 124
Loc: Baghdad, Iraq
Great, that worked just fine.

Top
#244636 - 11/02/03 12:28 AM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: scot]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Cool.... for some people it needs to be above. Very odd. <img src="http://www.ubbdev.com/forum/images/graemlins/crazy.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#244637 - 11/02/03 12:34 AM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: Daine]
TheInsider Offline
Journeyman

Registered: 03/16/03
Posts: 124
Loc: Baghdad, Iraq
That's why we have you around <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /> <br /><br />I bought a couple of PHP books... I am taking a contract job in Iraq soon and will have plenty of time to hone my PHP skills while I'm there.
_________________________
Always looking for that next great thing...

My site: www.iraqiinsider.com

Top
#244638 - 11/02/03 11:47 AM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: Daine]
TheInsider Offline
Journeyman

Registered: 03/16/03
Posts: 124
Loc: Baghdad, Iraq
I took your Mod and instead of putting the display in the ubbt.inc.php file I put it into the header.php include file. This way it shows up on the top right of my screen where I have blank space anyways.<br /><br />Here is what my /includes/header.php file looks like for anyone else interested. I did change some table properties in the header.php and in the Mod to get this how I wanted it to look. I took out the table properties in the Mod all together since it was going into a table already. <br /><br />You can look on my website to see how it looks.<br /><br />
Code:
  <br />&lt;table border="0" cellpadding="1" cellspacing="0" width="95%" class="tablesurround" align="center"&gt; <br />&lt;tr&gt; <br />&lt;td align="center"&gt; <br />&lt;table border="0" cellpadding="1" cellspacing="0" width="100%" class="tableborders" align="center"&gt; <br />&lt;tr&gt; <br />&lt;td align="center"&gt; <br />&lt;table border="0" cellpadding="0" cellspacing="0" width="70%" align="left"&gt; <br />&lt;tr&gt; <br />&lt;img src="http://www.tampainsider.com/images/tampains_logo.gif"&gt;<br />&lt;/tr&gt; <br /><br />&lt;table border="0" cellpadding="0" cellspacing="0" width="30%"&gt;<br />&lt;tr valign="middle"&gt;<br /><br />&lt;?<br />	$boardkeyword = "banners";<br />	<br /><br />// -----------------------------------------------<br />// End of variables - do not edit below this line<br /><br /><br /><br />// ---------------<br />// Lets pull a random banner ad - by JoshPet<br /><br />	if ($config['banners']) {<br />		$query = "<br />			SELECT B_Subject,B_Body<br />			FROM {$config['tbprefix']}Posts<br />			WHERE B_Board = '$boardkeyword'<br />			AND B_Number = {$config['banners']}<br />		";<br />	}<br />	else {<br />		$query = "<br />			SELECT COUNT(*)<br />			FROM {$config['tbprefix']}Posts<br />			WHERE B_Board = '$boardkeyword'<br />		";<br />		$sth = $dbh -&gt; do_query($query);<br />	   list($totalcount) = $dbh -&gt; fetch_array($sth);<br />   	   $dbh -&gt; finish_sth($sth);<br /><br />		$RandNumber = 0;<br />		if ($totalcount &gt; 1) {<br />			$RandNumber = rand(0,($totalcount -1));<br />		}			<br /><br />		$query = "<br />			SELECT B_Subject,B_Body<br />			FROM {$config['tbprefix']}Posts<br />			WHERE B_Board = '$boardkeyword'<br />			LIMIT $RandNumber,1<br />		";<br />	}<br />		$sth = $dbh -&gt; do_query($query);<br />		list ($Title,$Banner)= $dbh -&gt; fetch_array($sth);<br />		$dbh -&gt; finish_sth($sth);<br /><br />    $html = new html;<br />    list($tbopen,$tbclose) = $this -&gt; table_wrapper();<br /><br />// If we found the banner, we'll send the output<br />// otherwise there just won't be a box.<br />if ($Banner) {<br />echo "<br />&lt;b&gt;&lt;font color=\"blue\"&gt;&lt;u&gt;Did You Know...&lt;/u&gt; - &lt;i&gt;$Banner&lt;/i&gt;&lt;/b&gt;&lt;/font&gt;<br />";<br />}<br />?&gt;<br />&lt;/tr&gt;<br />&lt;/table&gt;<br />
<br /><br />Thanks for the great Mod Josh.
_________________________
Always looking for that next great thing...

My site: www.iraqiinsider.com

Top
#244639 - 01/29/04 04:50 PM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: scot]
Gregori Offline
Member

Registered: 09/14/02
Posts: 157
Will this rotator work with 6.4.1? Anyone tested it?

Top
#244640 - 01/29/04 05:48 PM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: tubedogg_dup1]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Yes,<br /><br />I'm using it on several 6.4 installs. Not sure if the instructions work word for word, but it should be fine. <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#244641 - 05/20/04 09:24 AM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: Daine]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
thought i'd try this hack again, looks like i needed that little amendment at the end as well, works ok now, on 6.4 <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />

Top
#244642 - 03/15/05 06:22 PM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: sf49rminer]
Earpman Offline
Lurker

Registered: 06/04/03
Posts: 1
Will this work on version 6.5b4?<br /><br />I am having trouble finding the config file to edit, doesn't look like you can edit it in the new control panel.<br /><br />Ron

Top
#244643 - 07/11/05 04:04 PM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: Stub]
J.C. Offline
Addict

Registered: 08/11/00
Posts: 1551
Will this work on 6.5.1.1 ?
_________________________
- Custom Web Development
http://www.JCSWebDev.com

Top
Page 1 of 2 1 2 >



Moderator:  Ian_W 
Latest Posts
[7.2.1] - Naked shoutbox
by bellaonline
05/05/12 05:00 PM
[7.x] Stop Forum Spam Integration v0.4
by bellaonline
05/05/12 03:53 PM
Shout Box

(Views)Popular Topics
Known public proxy servers 1689885
Integrated Index Page (IIP) 5.3.1 555705
Finished-[6.5.2] Games Arcade Deluxe v1.9 501236
Integrated Index Page (IIP) 5.1.1 415112
TLD Bv2.1 Released - Threads Links Directory 396822
[6.0x] Who's Online 4.0.0 [Finished] 389412
Finished-[6.5.1] Integrated Index Page (IIP) 6.5 330423
Q & A 298663
Slash UBB 266936
[6.3.x] [beta] Hit Hack 2.0 227970
Forum Stats
13621 Members
59 Forums
37191 Topics
295716 Posts

Max Online: 686 @ 06/28/07 07:04 AM

 

 

 
fusionbb message board php hacks